package com.victor9ac.tfm.web.model.photos;

import java.util.List;

import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.codehaus.jackson.annotate.JsonProperty;

@JsonIgnoreProperties(ignoreUnknown = true)
public class PhotosView {

	@JsonProperty("imgs")
	private List<PhotoView> imageList;

	public List<PhotoView> getImageList() {
		return imageList;
	}

	public void setImageList(List<PhotoView> imageList) {
		this.imageList = imageList;
	}
	
	
	public String toString(){
		return photosPrint();
	}

	private String photosPrint() {
		String res = null;
		if (imageList != null && !imageList.isEmpty()){
			res = printAllPhotos();
			
		}else{
			res = "no photos found :(";
		}
		return res;
	}

	private String printAllPhotos() {
		String res;
		res = "Images: ";
		for (PhotoView iv: imageList){
			res+= "["+iv.toString()+"]\n";
		}
		return res;
	}
}
